-
Notifications
You must be signed in to change notification settings - Fork 142
Card Stack ticks all by default #2793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Card Stack ticks all by default #2793
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2793 +/- ##
==========================================
+ Coverage 71.73% 71.83% +0.09%
==========================================
Files 134 134
Lines 7303 7324 +21
Branches 1613 1621 +8
==========================================
+ Hits 5239 5261 +22
+ Misses 2018 1936 -82
- Partials 46 127 +81 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Perhaps we can make the Otherwise, we can do the opposite, by supporting a way to disable the select all button |
|
@MoshiMoshiMochi If there are non-trivial UX changes, also provide screenshots of those changes. |
|
Hi @gerteck & @damithc are these changes something similar to what you had in mind?
See Demo Example 1 (On the functionality of Select All)e.g. serving this example <frontmatter>
layout: default.md
title: Hello World
pageNav: 1
pageNavTitle: "Chapters of This Page"
</frontmatter>
<cardstack searchable>
<card header="**Winston Churchil**" tag="Success, Perseverance" disable=true>
Success is not final, failure is not fatal: it is the courage to continue that counts
</card>
<card header="**Albert Einstein**" tag="Success, Perseverance" disabled=true>
In the middle of every difficulty lies opportunity
</card>
<card header="**Theodore Roosevelt**" tag="Motivation, Hard Work">
Do what you can, with what you have, where you are
</card>
<card header="**Steve Jobs**" tag="Happiness, Mindset">
Your time is limited, so don’t waste it living someone else’s life
</card>
</cardstack>
Hello worldSee Demo Example 2 (On showing/hiding the select all tag)e.g. serving this example <frontmatter>
layout: default.md
title: Hello World
pageNav: 1
pageNavTitle: "Chapters of This Page"
</frontmatter>
<cardstack searchable show-select-all="FaLsE">
<card header="**Winston Churchil**" tag="Success, Perseverance">
Success is not final, failure is not fatal: it is the courage to continue that counts
</card>
<card header="**Albert Einstein**" tag="Success, Perseverance">
In the middle of every difficulty lies opportunity
</card>
<card header="**Theodore Roosevelt**" tag="Motivation, Hard Work">
Do what you can, with what you have, where you are
</card>
<card header="**Steve Jobs**" tag="Happiness, Mindset">
Your time is limited, so don’t waste it living someone else’s life
</card>
</cardstack>
<cardstack searchable>
<card header="**Winston Churchil**" tag="Success, Perseverance">
Success is not final, failure is not fatal: it is the courage to continue that counts
</card>
<card header="**Albert Einstein**" tag="Success, Perseverance">
In the middle of every difficulty lies opportunity
</card>
<card header="**Theodore Roosevelt**" tag="Motivation, Hard Work">
Do what you can, with what you have, where you are
</card>
<card header="**Steve Jobs**" tag="Happiness, Mindset">
Your time is limited, so don’t waste it living someone else’s life
</card>
</cardstack>
Hello world
|
|
@MoshiMoshiMochi I think the |
Noted will get to work on that! |
|
Hi Prof @damithc! I've set the I've also experimented using a linear gradient. This could possibly be another way of making it stand out further since all other toggle badges use a single color. I also tried experimenting with radial/conic gradients but I couldn't really come up with something that I felt blended in with the current design.
2. Linear Gradient fading in and out and in
Do let me know if this is something you had in mind (, which option you prefer), and/or if there are other styling options/ideas you would like me to experiment/proceed with. |
@MoshiMoshiMochi I like the first one but let's go without the border. I think no need for bold either. If possible, experiment putting the tick box on the left of the text for |
|
Hi prof @damithc! As requested I have experimented with removing the bold, border and also by moving the checkbox to the left. Here is the checkbox on the right like usual for comparison. I also tried experimenting with moving all the individual tags to the second row, while keeping the first row for the Kindly let me know if this is something you had in mind (, which option you prefer), and once more if there are other styling options/ideas you would like me to further experiment/proceed with. |
|
@MoshiMoshiMochi I prefer the first one. It still looks bold. Likely the UI control used is using bold by default. You may have to explicitly use non-bold. Separately, I'm wondering if we should auto-omit the select-all if there are fewer than N tags (e.g., 3). This can be a separate PR though. |
|
Hi prof @damithc! Kindly view the changes below, I've explicitly set the font weight for the select all to be normal. Do let me know if this is what you had in mind.
Yep sounds like a great idea! The current design already checks the length of the |
Looks good. Let's go with this one.
Let's set it to |
|
Hi prof @damithc! I've made the changes as requested. From the example below, we can see that while both cardstacks have 3 cards, the cardstack below only has 3 tags and therefore the e.g. serving this file <frontmatter>
layout: default.md
title: Hello World
pageNav: 1
pageNavTitle: "Chapters of This Page"
</frontmatter>
<cardstack searchable>
<card header="**Winston Churchil**" tag="Success, Perseverance">
Success is not final, failure is not fatal: it is the courage to continue that counts
</card>
<card header="**Albert Einstein**" tag="Success, Perseverance">
In the middle of every difficulty lies opportunity
</card>
<card header="**Theodore Roosevelt**" tag="Motivation, Hard Work">
Do what you can, with what you have, where you are
</card>
</cardstack>
<cardstack searchable>
<card header="**Winston Churchil**" tag="Success, Perseverance">
Success is not final, failure is not fatal: it is the courage to continue that counts
</card>
<card header="**Albert Einstein**" tag="Success, Perseverance">
In the middle of every difficulty lies opportunity
</card>
<card header="**Theodore Roosevelt**" tag="Motivation">
Do what you can, with what you have, where you are
</card>
</cardstack>
Hello world
|
damithc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current UX looks good, @MoshiMoshiMochi
No further comments (on the UX aspect) from me.












What is the purpose of this pull request?
resolves #2781
Overview of changes:
show-select-allflag as an optional cardstack (defaults to true) & updated the user guide documentation accordingly.Anything you'd like to highlight/discuss:
cardStackRef.tagMappingto ensure that once the<card>components register their tags, that the parent automatically adds them toselectedTags. SinceselectedTagsis now populated on load, all tags appear checked to begin with.2.1 It can be used to toggle all tags to clear/select all tags in
2.2 It syncs with all the selected tags, meaning that unchecking a single tag automatically unchecks "Select All". This is to better signify that not all tags have been selected.
showAllTags(showTag)to accept a boolean. It now serves as a master switch to loop through all child cards and set their disableTag state to either true (visible) or false (hidden).updateTagso that unchecking all cards now displays no other cards. Previously doing so would automatically display all cards again.See Demo Example 1 (On the functionality of Select All)
e.g. serving this example
See Demo Example 2 (On showing/hiding the select all tag)
e.g. serving this example
UserGuide error? (Resolved)
Shouldn't
disablebedisabled? See demo example above for reference. Kindly let me know if I'm mistaken or if I should go ahead and fix this since its so small.markbind/docs/userGuide/syntax/cardstacks.md
Lines 138 to 153 in ca4a65b
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Update Card Stack to tick all tags by default
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):